Loading...
 

Frontal solver algorithm

The frontal solver algorithm was the first algorithm to modify Gaussian elimination using additional knowledge of the finite element method. The aim of the algorithm's modification was to avoid the zeros in the matrix resulting from interactions between basis functions located far from each other and spread on a computational grid.
This algorithm was proposed by Bruce Irons in 1970. Bruce Irons gained worldwide fame after inventing this algorithm [1]. His scientific results deserve even more recognition, because he struggled with multiple sclerosis.
The idea of the algorithm is to generate local matrices resulting from the interaction of basis functions on individual finite elements. Instead of generating the entire matrix or the entire system of equations, we arrange the finite elements in the selected order. We generate a fragment of the matrix resulting from the interaction basis functions on the first element.
The rows and columns of element matrices correspond to the individual basis functions spread on the given element. The terms of the matrix denote the interaction of basis functions from the row and column (the integral of the product of basis functions calculated on a given element).
Some rows of the matrix can be fully generated, some only partially, because some columns will be missing due to the fact that the basis functions span on a given element extending over neighboring elements and interact (having common supports) with the basis functions of subsequent elements (with subsequent columns of the matrix).


Consider the frontal solver algorithm in the following example. Let us assume that we use the isogeometric finite element method for three one-dimensional elements, Consider the frontal solver algorithm in the following example. Let us assume that we use the isogeometric finite element method for three one-dimensional elements, for square B-spline functions. So we have five B-spline functions spanning over three elements.
Element matrices for the isogeometric finite element method, as described in chapter one, contain interactions between segments of B-splines spread over a single interval - a finite element
\( \begin{bmatrix} \int_0^1{B_1(x)B_1(x)dx} & \int_0^1{B_1(x)B_2(x)dx } & \int_0^1{B_1(x)B_3(x)dx} \\ \int_0^1{B_2(x)B_1(x)dx} & \int_0^1{B_2(x)B_2(x)dx } & \int_0^1{B_2(x)B_3(x)dx } \\ \int_0^1{B_3(x)B_1(x)dx} & \int_0^1{B_3(x)B_2(x)dx} & \int_0^1{B_3(x)B_3(x)dx } \\ \end{bmatrix} = \begin{bmatrix} \frac{1}{20} & \frac{13}{120} & \frac{1}{120} \\ \frac{13}{120} & \frac{9}{20} & \frac{13}{120} \\ \frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \)
For a four-element mesh, the global matrix looks like this: \( \begin{bmatrix} \frac{1}{20} & \frac{13}{120} & \frac{1}{120} & \cdots \\ \frac{13}{120} & \frac{9}{20} +\color{red}{\frac{1}{20}}& \frac{13}{120} + \color{red}{\frac{13}{120}} & \color{red}{\frac{1}{120}} & \cdots \\ \frac{1}{120} & \frac{13}{120} +\color{red}{\frac{13}{120}} & \frac{1}{20} +\color{red}{\frac{9}{20}} +\color{blue}{\frac{1}{20}} & \color{red}{\frac{13}{120}} +\color{blue}{\frac{13}{120}} & \color{blue}{\frac{1}{120}} & \cdots \\ \cdots & \color{red}{\frac{1}{120}} & \color{red}{\frac{13}{120}} +\color{blue}{\frac{13}{120}} & \color{red}{\frac{1}{20}}+\color{blue}{\frac{9}{20}} +\color{green}{\frac{1}{20}} & \color{blue}{\frac{13}{120}} +\color{green}{\frac{13}{120}} & \color{green}{\frac{1}{120}} \\ & \cdots & \color{blue}{\frac{1}{120} } & \color{blue}{\frac{13}{120}} +\color{green}{\frac{13}{120}} & \color{blue}{\frac{1}{20} } + \color{green}{\frac{9}{20}} & \color{green}{\frac{13}{120} } \\ & & \cdots & \color{green}{\frac{1}{120}} & \color{green}{\frac{13}{120}} & \color{green}{\frac{1}{20} }\\ \end{bmatrix} \)
The frontal solver algorithm generates element matrices one by one and adds them to the global matrix, eliminating fully aggregated rows.
So in the first step, our element matrix looks like this:
\( \begin{bmatrix} & B1(x) & B2(x) & B3(x) \\ B1(x) & \frac{1}{20} & \frac{13}{120} & \frac{1}{120} \\B2(x) & \frac{13}{120} & \frac{9}{20} & \frac{13}{120} \\ B3(x) & \frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \)
To better illustrate the operation of the algorithm, we will leave the numbers in the fractional form, remembering, of course, that they are stored in the computer in the floating-point form.
In the first element, we are able to eliminate the first row that contains the segment of the first B-spline that has been trimmed to the edge of our mesh. So, we eliminate the first row. We scale the first row to get one on the diagonal
\( \begin{bmatrix}\frac{1}{20}{\color{red}*20} & \frac{13}{120}{\color{red}*20} & \frac{1}{120}{\color{red}*20} \\\frac{13}{120} & \frac{9}{20} & \frac{13}{120} \\\frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\\ \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \\ \end{bmatrix} = \begin{bmatrix}1{\color{red}*20} \\ 1 \\ 1 \\ \end{bmatrix} \)
\( \begin{bmatrix}{\color{red}1} & {\color{red}\frac{13}{6}} & {\color{red}\frac{1}{6}} \\\frac{13}{120} & \frac{9}{20} & \frac{13}{120} \\\frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \nonumber\\ \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \\ \end{bmatrix} = \begin{bmatrix}{\color{red}20} \\ 1 \\ 1 \\ \end{bmatrix} \)
Since the first row is fully generated, we can eliminate it (run Gaussian elimination which subtracts this row from the rest of the rows available in the matrix). This is because even if the following lines are not fully generated, we can subtract the first line from them. As we generate the rest of these non-generated lines, we add the missing terms to them. Since adding and subtracting lines is commutative, we can subtract the fully generated line first and then add the missing remainder to those lines.
\( 2^{nd}=2^{nd}-1^{st}*A(2,1)=2^{nd}-1^{st}*13/120 \)
\( \begin{bmatrix}{\color{red}1} & {\color{red}\frac{13}{6}} & {\color{red}\frac{1}{6}} \\\frac{13}{120}{\color{red}-1\frac{13}{120}} & \frac{9}{20}{\color{red}-\frac{13}{6}\frac{13}{120}} & \frac{13}{120}{\color{red}-\frac{1}{6}\frac{13}{120}} \\\frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\ \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \\ \end{bmatrix} = \begin{bmatrix}{\color{red}20} \\ 1{\color{red}-20\frac{13}{120}} \\ 1 \end{bmatrix} \)
\( \begin{bmatrix}1 & \frac{13}{6} & \frac{1}{6} & {\color{red}\frac{31}{144}} & {\color{red}\frac{13}{144}} \\\frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\ \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \\ \end{bmatrix} = \begin{bmatrix} 20 \\ {\color{red}-\frac{7}{6}} \\ 1 \end{bmatrix} \)
\( 3^{rd}=3^{rd}-1^{st}*A(3,1)=3^{rd}-1^{st}1/120 \)
\( \begin{bmatrix}1 & \frac{13}{6} & \frac{1}{6} \\ 0 & \frac{31}{144} & \frac{13}{144} \\\frac{1}{120}{\color{red}-1\frac{1}{120}} & \frac{13}{120}{\color{red}-\frac{31}{144}\frac{1}{120}} & \frac{1}{20}{\color{red}-\frac{13}{144}\frac{1}{120}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \\ \end{bmatrix} = \begin{bmatrix}20 \\ -\frac{7}{6} \\ 1{\color{red}-20\frac{1}{120}} \end{bmatrix} \)
\( \begin{bmatrix}1 & \frac{13}{6} & \frac{1}{6} \\ 0 & \frac{31}{144} & \frac{13}{144} & {\color{red}\frac{1841}{17280}} & {\color{red}\frac{864}{17280}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \\ \end{bmatrix} = \begin{bmatrix} 20 \\ -\frac{7}{6} \\ {\color{red}\frac{5}{6}} \end{bmatrix} \)
At this point we are not able to eliminate the second row because all the B splines in it are also spanned over the second element.
So we cannot multiply the second row by the column value because we would leave out the rest of the row (we will not multiply the part of the row that has not been generated yet). So, we need to generate the matrix of the second element
\( \begin{bmatrix}{\color{red}\frac{1}{20}} & {\color{red}\frac{13}{120}} & {\color{red}\frac{1}{120}}\\{\color{red}\frac{13}{120}} & {\color{red}\frac{9}{20}} & {\color{red}\frac{13}{120}} \\ {\color{red}\frac{1}{120}} & {\color{red}\frac{13}{120}} & {\color{red}\frac{1}{20}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix} {\color{red}1} \\ {\color{red}1} \\ {\color{red}1} \end{bmatrix} \)
and add it to part of the already factored matrix of the first element.
\( \begin{bmatrix}1 & \frac{13}{6} & \frac{1}{6} & 0 \\ 0 & \frac{31}{144}{\color{red}+\frac{1}{20}} & \frac{13}{144} {\color{red}+\frac{13}{120}}& {\color{red}\frac{1}{120}} \\ 0 & \frac{1841}{17280}{\color{red}+\frac{13}{120}} & \frac{864}{17280}{\color{red}+\frac{9}{20}} & {\color{red}\frac{13}{120}}\\ 0 & {\color{red}\frac{1}{120}} & {\color{red}\frac{13}{120}} & {\color{red}\frac{1}{20}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix}0 \\ -\frac{7}{6}{\color{red}+1} \\ \frac{5}{6}{\color{red}+1} \\ {\color{red}1} \end{bmatrix} \)
In this matrix, we can already leave the first row and the first column alone, because they have already been factored (the first row has been subtracted from the remaining rows, and in the first column below the diagonal are all zeros)
\( \begin{bmatrix}\frac{119}{720} & -\frac{13}{2160} & \frac{1}{120} \\\frac{3713}{17280} & \frac{143}{720} & \frac{13}{120} \\ \frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix} -\frac{1}{6} \\ \frac{11}{6} \\ 1 \end{bmatrix} \)
At this point, again, the first row is fully generated, so we can eliminate it, while the following rows are waiting for the rest of the generation to be generated, which is related to the fact that the B-spline basis functions extend over the following elements and intersect (they have common carriers). function domains with other consecutive B-spline functions that appear on subsequent elements.
So we eliminate the first row in our frontal matrix
\( 1^{st}=1^{st}\frac{720}{119} \)
\( \begin{bmatrix}\frac{119}{720}{\color{red}\frac{720}{119}} & -\frac{13}{2160}{\color{red}\frac{720}{119}} & \frac{1}{120}{\color{red}\frac{720}{119}} \\\frac{3713}{17280} & \frac{143}{720} & \frac{13}{120} \\ \frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix} -\frac{1}{6}{\color{red}\frac{720}{119}} \\ \frac{11}{6} \\ 1 \end{bmatrix} \)
\( \begin{bmatrix} {\color{red}1} & {\color{red}-\frac{13}{357}} & {\color{red}\frac{6}{119}} \\ \frac{3713}{17280} & \frac{143}{720} & \frac{13}{120} \\ \frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix}{\color{red}-\frac{120}{119}} \\ \frac{11}{6} \\ 1 \end{bmatrix} \)
We now eliminate the first row by subtracting it from the not-fully-summed up second and third rows. The first column is fully summed so we can generate zeros in it.
\( 2^{nd}=2^{nd}-1^{st}\frac{3713}{17280} \)
\( \begin{bmatrix} 1 & -\frac{13}{357} & \frac{6}{119} \\ \frac{3713}{17280}{\color{red}-1\frac{17280}{3713}} & \frac{143}{720}{\color{red}-\frac{13}{357}\frac{17280}{3713}} & \frac{13}{120}{\color{red}-\frac{6}{119}\frac{17280}{3713}} \\ \frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix} -\frac{120}{119} \\ \frac{11}{6}{\color{red}+\frac{120}{119}\frac{3713}{17280}} \\ 1 \end{bmatrix} \)
\( \begin{bmatrix} 1 & -\frac{13}{357} & \frac{6}{119} & {\color{red}\frac{9270521}{318129840}} & {\color{red}-\frac{6697589}{53021640}} \\ \frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix} -\frac{120}{119} \\ {\color{red}\frac{35129}{17136}} \\ 1 \end{bmatrix} \)
\( 3^{rd}=2^{rd}-1^{st}\frac{1}{120} \)
\( \begin{bmatrix} 1 & -\frac{13}{357} & \frac{6}{119} \\0 & \frac{9270521}{318129840} & -\frac{6697589}{53021640} \\ \frac{1}{120}{\color{red}-1\frac{1}{120}} & \frac{13}{120}{\color{red}+\frac{13}{357}\frac{1}{120}} & \frac{1}{20}{\color{red}-\frac{6}{119}\frac{1}{120}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix} -\frac{120}{119} \\ \frac{35129}{17136} \\ 1{\color{red}+\frac{120}{119}\frac{1}{120}} \end{bmatrix} \)
\( \begin{bmatrix} 1 & -\frac{13}{357} & \frac{6}{119} \\0 & \frac{9270521}{318129840} & -\frac{6697589}{53021640} \\ {\color{red}0} & {\color{red}\frac{2327}{21420}} & {\color{red}\frac{59}{1190}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ \end{bmatrix} = \begin{bmatrix} -\frac{120}{119} \\ \frac{27703}{17136} \\ {\color{red}\frac{120}{119}} \end{bmatrix} \)
So, we eliminated the first row, and we cannot eliminate the remaining rows anymore because they are not fully summed (the B-spline functions related to these rows have remaining parts on other elements) so we cannot multiply them by the value in the column because we would skip the rest of the rows. (we will not multiply any part of the rows that has not yet been generated).
In our example, we generate an element matrix (along with the right side) related to the last third element
\( \begin{bmatrix} {\color{blue}\frac{1}{20}} & {\color{blue}\frac{13}{120}} & {\color{blue}\frac{1}{120}}\\ {\color{blue}\frac{13}{120}} & {\color{blue}\frac{9}{20}} & {\color{blue}\frac{13}{120}}. & {\color{blue}\frac{13}{120}} & {\color{blue}\frac{1}{20}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{3} \\ u_{4} \\ u_{5} \\ \end{bmatrix} = \begin{bmatrix} {\color{blue}1} \\ {\color{blue}1} \\ {\color{blue}1} \end{bmatrix} \)
and we add it to our frontal matrix
\( \begin{bmatrix} 1 & -\frac{13}{357} & \frac{6}{119} & 0 \\ 0 & \frac{9270521}{318129840}{\color{blue}+\frac{1}{20}} & -\frac{6697589}{53021640} {\color{blue}+\frac{13}{120}} & {\color{blue}\frac{1}{120}}\\ 0 & \frac{2327}{21420}{\color{blue}+\frac{13}{120}} & \frac{59}{1190}{\color{blue}+\frac{9}{20}} & {\color{blue}\frac{13}{120}} \\ 0 & {\color{blue}\frac{1}{120}} & {\color{blue}\frac{13}{120}} & {\color{blue}\frac{1}{20}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ u_{5} \\ \end{bmatrix} = \begin{bmatrix}-\frac{120}{119} \\ \frac{27703}{17136}{\color{blue}+1} \\ \frac{120}{119}{\color{blue}+1} \\ {\color{blue}1} \end{bmatrix} \)
\( \begin{bmatrix} 1 & -\frac{13}{357} & \frac{6}{119} & 0 \\ 0 & \frac{9270521}{318129840}{\color{blue}+\frac{1}{20}} & -\frac{6697589}{53021640} {\color{blue}+\frac{13}{120}} & {\color{blue}\frac{1}{120}}\\ 0 & \frac{2327}{21420}{\color{blue}+\frac{13}{120}} & \frac{59}{1190}{\color{blue}+\frac{9}{20}} & {\color{blue}\frac{13}{120}} \\ 0 & {\color{blue}\frac{1}{120}} & {\color{blue}\frac{13}{120}} & {\color{blue}\frac{1}{20}} \\ \end{bmatrix} \\ \begin{bmatrix} u_{2} \\ u_{3} \\ u_{4} \\ u_{5} \\ \end{bmatrix} = \begin{bmatrix} -\frac{120}{119} \\ \frac{27703}{17136}{\color{blue}+1} \\ \frac{120}{119}{\color{blue}+1} \\ {\color{blue}1} \end{bmatrix} \)
In this matrix, we can already leave the first row and the first column alone, because they have already been factored (the first row has been subtracted from the remaining rows, and in the first column below the diagonal are all zeros)
\( \begin{bmatrix} \frac{25177013}{318129840} & -\frac{953578}{53021640} & \frac{1}{120} \\ \frac{1859}{8568} & \frac{1189}{23800} & \frac{13}{120} \\ \frac{1}{120} & \frac{13}{120} & \frac{1}{20} \\ \end{bmatrix} \\ \begin{bmatrix} u_{3} \\ u_{4} \\ u_{5}\\ \end{bmatrix} = \begin{bmatrix} \frac{44839}{17136}\\ \frac{239}{119} \\ 1 \end{bmatrix} \)

This is the last matrix for the algorithm; moreover, it is dense, so we can run a Gaussian pivoting elimination algorithm to solve it, back-substituting to solve the rest of the equations.

Now let us make the following observations.
The frontal solver algorithm in the form shown above allows only pivoting within rows that have been fully summed. If the matrix is not symmetric and positively defined, this is a problem and the resulting solution may not be correct.
The frontal solver algorithm can be generalized to any multidimensional meshes, but its main disadvantage is the fact that the size of the frontal matrix (to which we add individual elements) may increase and the cost of this solver is high. The size of the frontal matrix is related to the size of the interface between the added and eliminated elements and the rest of the computational mesh. This interface is called a solver front. In general, the size of the front depends on the size and shape of the computational grid. When viewing the elements of a two-dimensional grid row by row, rows whose functions also span over the following rows will have to wait for elimination until we include the next row in the frontal matrix. Therefore, the size of the frontal matrix will be equal to the number of basis functions on the mesh cross-section, which in two dimensions is \( N^{0.5} \) where \( N \) is a number of base functions on the grid.


Ostatnio zmieniona Czwartek 09 z Wrzesień, 2021 13:32:26 UTC Autor: Maciej Paszynski
Zaloguj się/Zarejestruj w OPEN AGH e-podręczniki
Czy masz już hasło?

Hasło powinno mieć przynajmniej 8 znaków, litery i cyfry oraz co najmniej jeden znak specjalny.

Przypominanie hasła

Wprowadź swój adres e-mail, abyśmy mogli przesłać Ci informację o nowym haśle.
Dziękujemy za rejestrację!
Na wskazany w rejestracji adres został wysłany e-mail z linkiem aktywacyjnym.
Wprowadzone hasło/login są błędne.